home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 7489 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.5 KB

  1. Path: mail2news.demon.co.uk!thermo.demon.co.uk
  2. From: Alasdair McIntyre <alasdair@thermoteknix.co.uk>
  3. Newsgroups: comp.lang.pascal.misc,comp.lang.c++,comp.lang.c,comp.lang.pascal.borland
  4. Subject: Re: Tough FACTORIAL math problem...
  5. Date: Fri, 23 Feb 1996 16:04:35 GMT
  6. Organization: Thermoteknix Systems Limited
  7. Message-ID: <188178796wnr@thermoteknix.co.uk>
  8. References: <4fr8be$ass@news.iconn.net> <4g0giv$94s@sun132.spd.dsccc.com> <4gbsir$opr@axl02it.ntc.nokia.com> <4gintg$1f7@antares.dfma.com>
  9. Reply-To: alasdair@thermoteknix.co.uk
  10. X-NNTP-Posting-Host: thermo.demon.co.uk
  11. X-Broken-Date: Fri, 23 Feb 1996 12:45:49 0100
  12. X-Newsreader: Newswin Alpha 0.9
  13. X-Mail2News-Path: disperse.demon.co.uk!post.demon.co.uk!thermo.demon.co.uk
  14.  
  15. Risto Lankinen <risto.lankinen@ntc.nokia.com> wrote:
  16. >
  17. >There is an algorithm that calculates the last non-zero _binary_
  18. >digit of ANY factorial - with SUB-LOGARITHMIC time even in the worst
  19. >case!!!
  20. >
  21. >Mail me if interested but be prepared to explain what you need it
  22. >for. The algorithm is indeed very VERY fast, and so I don't want to
  23. >give it away without being credited at least.  Also, please mention
  24. >"rightmost non-zero binary digit algorithm" in your request.
  25.  
  26. A more interesting problem would be to generalise this
  27. and seek the rightmost non-zero digit of n! in base b
  28. for arbitrary n and b>2 ;-).
  29.  
  30. Thoughts anyone?
  31.  
  32. I guess for a really general problem we should
  33. allow n real - last digit of Gamma(0.5)...
  34. -- 
  35. Alasdair McIntyre
  36. alasdair@thermoteknix.co.uk
  37.  
  38.